From: Florian Müllner Date: Wed, 18 Jun 2025 22:37:57 +0000 (+0200) Subject: cleanup: Remove unused eslint-disable directives X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~124^2^2~7 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c70ba22bca57fb64a6e665da4b875288dc7a9706;p=gnome-shell.git cleanup: Remove unused eslint-disable directives The 'camelcase' rule only applies to variables and properties, not to function names or getter/setters. The 'no-await-in-loop' rule only applies if there is a loop. The 'require-atomic-updates' rule no longer applies to properties by default. The 'no-constant-condition' rule no longer applies to `while(true)` by default. Part-of: --- diff --git a/js/dbusServices/extensions/extensionPrefsDialog.js b/js/dbusServices/extensions/extensionPrefsDialog.js index 9a88397fd..75687c7a8 100644 --- a/js/dbusServices/extensions/extensionPrefsDialog.js +++ b/js/dbusServices/extensions/extensionPrefsDialog.js @@ -46,7 +46,6 @@ export const ExtensionPrefsDialog = GObject.registerClass({ this.set_titlebar(w); } - // eslint-disable-next-line camelcase set_titlebar() { // intercept fatal libadwaita error, show error page instead GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { diff --git a/js/ui/altTab.js b/js/ui/altTab.js index b2d87e341..9e6e15bbf 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -682,7 +682,6 @@ class AppIcon extends St.BoxLayout { this.add_child(this.label); } - // eslint-disable-next-line camelcase set_size(size) { this.icon = this.app.create_icon_texture(size); this._iconBin.child = this.icon; diff --git a/js/ui/background.js b/js/ui/background.js index 130d45108..cee38f7dc 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -661,7 +661,6 @@ class Animation extends GnomeBG.BGSlideShow { this.loaded = false; } - // eslint-disable-next-line camelcase load_async(cancellable, callback) { super.load_async(cancellable, () => { this.loaded = true; diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js index 96238cf87..1c47eda23 100644 --- a/js/ui/status/rfkill.js +++ b/js/ui/status/rfkill.js @@ -43,7 +43,6 @@ const RfkillManager = GObject.registerClass({ .catch(e => console.error(e.message)); } - /* eslint-disable camelcase */ get airplane_mode() { return this._proxy.AirplaneMode; } @@ -59,7 +58,6 @@ const RfkillManager = GObject.registerClass({ get show_airplane_mode() { return this._proxy.HasAirplaneMode && this._proxy.ShouldShowAirplaneMode; } - /* eslint-enable camelcase */ _changed(proxy, properties) { for (const prop in properties.deepUnpack()) { diff --git a/tests/shell/basic.js b/tests/shell/basic.js index 34ee6a63e..221c8081f 100644 --- a/tests/shell/basic.js +++ b/tests/shell/basic.js @@ -96,12 +96,10 @@ export async function run() { Scripting.scriptEvent('applicationsShowStart'); console.debug('Showing applications'); - // eslint-disable-next-line require-atomic-updates Main.overview.dash.showAppsButton.checked = true; await Scripting.waitLeisure(); Scripting.scriptEvent('applicationsShowDone'); console.debug('Hiding applications'); - // eslint-disable-next-line require-atomic-updates Main.overview.dash.showAppsButton.checked = false; await Scripting.waitLeisure(); diff --git a/tests/shell/closeWithActiveWindows.js b/tests/shell/closeWithActiveWindows.js index d0adffad0..0c510fc45 100644 --- a/tests/shell/closeWithActiveWindows.js +++ b/tests/shell/closeWithActiveWindows.js @@ -7,8 +7,6 @@ import * as Scripting from 'resource:///org/gnome/shell/ui/scripting.js'; /** Run test. */ export async function run() { - /* eslint-disable no-await-in-loop */ - /* Make created windows remain visible during exit. */ await Scripting.disableHelperAutoExit(); @@ -29,6 +27,4 @@ export async function run() { await Scripting.waitTestWindows(); await Scripting.waitLeisure(); await Scripting.sleep(1000); - - /* eslint-enable no-await-in-loop */ } diff --git a/tests/shell/core.js b/tests/shell/core.js index 807bff820..c37caa635 100644 --- a/tests/shell/core.js +++ b/tests/shell/core.js @@ -153,11 +153,9 @@ export async function run() { for (let i = 0; i < 2; i++) { Scripting.scriptEvent('applicationsShowStart'); - // eslint-disable-next-line require-atomic-updates Main.overview.dash.showAppsButton.checked = true; await Scripting.waitLeisure(); Scripting.scriptEvent('applicationsShowDone'); - // eslint-disable-next-line require-atomic-updates Main.overview.dash.showAppsButton.checked = false; await Scripting.waitLeisure(); } diff --git a/tests/shell/headlessStart.js b/tests/shell/headlessStart.js index e04f51837..feae7ce6c 100644 --- a/tests/shell/headlessStart.js +++ b/tests/shell/headlessStart.js @@ -48,7 +48,6 @@ export function init() { * run: */ export async function run() { - /* eslint-disable no-await-in-loop */ Scripting.defineScriptEvent('overviewShowDone', 'Overview finished showing'); Scripting.defineScriptEvent('overviewHideDone', 'Overview finished hiding'); @@ -61,8 +60,6 @@ export async function run() { Main.overview.show(); await Scripting.waitLeisure(); - - /* eslint-enable no-await-in-loop */ } let monitorsChanged = false; diff --git a/tests/shell/hwtest.js b/tests/shell/hwtest.js index 8ded32388..35d608667 100644 --- a/tests/shell/hwtest.js +++ b/tests/shell/hwtest.js @@ -97,7 +97,7 @@ function extractBootTimestamp() { let result = null; let datastream = Gio.DataInputStream.new(sp.get_stdout_pipe()); - while (true) { // eslint-disable-line no-constant-condition + while (true) { let [line, length_] = datastream.read_line_utf8(null); if (line === null) break; @@ -143,7 +143,6 @@ export async function run() { await Scripting.sleep(1000); Scripting.scriptEvent('applicationsShowStart'); - // eslint-disable-next-line require-atomic-updates Main.overview.dash.showAppsButton.checked = true; await Scripting.waitLeisure();